#ifndef WEATHER_H
#define WEATHER_H

#include <QWidget>
#include <QStandardItem>
#include <QtNetwork/QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonObject>
#include <QJsonArray>
#include <QtCharts>

namespace Ui {
class weather;
}

class weather : public QWidget
{
    Q_OBJECT

public:
    explicit weather(QWidget *parent = nullptr);
    ~weather();
    void parseJson(QByteArray byteArray);
    void file_open();
    void weather_pic(QString str,int i);
public slots:
    void replyFinished(QNetworkReply *reply);
private slots:
    void on_pushButton_clicked();
private:
    Ui::weather *ui;
    QStandardItemModel * item;
    QStandardItem * item2;
    QNetworkAccessManager * manager;
    QNetworkAccessManager * city;
    QString city_name;
    QString city_num;
    QLineSeries *series_low;
    QLineSeries *series_hight;
    QChart *chart;
};

#endif // WEATHER_H
